<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<div class="navbar">
	<div class="navbar-inner">
		<div class="container">
			<sec:authorize access="isAnonymous()">
			<a href="<spring:url value="/"/>" class="brand">Project name</a>
			</sec:authorize>
			<sec:authorize access="isAuthenticated()">
			<a href="<spring:url value="/dashboard"/>" class="brand">Project name</a>
			</sec:authorize>
			
			
			<sec:authorize access="isAuthenticated()">
				<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> 
					<span class="icon-bar"></span> 
					<span class="icon-bar"></span> 
					<span class="icon-bar"></span>
				</a> 
			
				<div class="nav-collapse">
					<ul class="nav">
						<li>
							<a href="<spring:url value="/dashboard"/>" >
								<i class="icon-home icon-white"></i>&nbsp;
								<spring:message code="header.btn.home" />
							</a>
						</li>
						<sec:authorize access="hasRole('PERM_SEARCH_CUSTOMER')">
							<li>
								<a href="<spring:url value="/customers"/>" >
									<i class="icon-user icon-white"></i>&nbsp;
									<spring:message code="header.btn.customer" />
								</a>
							</li>
						</sec:authorize>
						<li><a href="#">Link</a></li>
						<li class="active"><a href="#">Link</a></li>
						<li class="dropdown">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="#">Action</a></li>
								<li><a href="#">Another action</a></li>
								<li><a href="#">Something else here</a></li>
								<li class="divider"></li>
								<li class="nav-header">Nav header</li>
								<li><a href="#">Separated link</a></li>
								<li><a href="#">One more separated link</a></li>
							</ul></li>
					</ul>
					<form action="" class="navbar-search pull-left">
						<input type="text" placeholder="Search" class="search-query span2">
					</form>
					<ul class="nav pull-right">
						<li><a href="#">Link</a></li>
						<li class="divider-vertical"></li>
						<li class="dropdown">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="#">Action</a></li>
								<li><a href="#">Another action</a></li>
								<li><a href="#">Something else here</a></li>
								<li class="divider"></li>
								<li><a href="#">Separated link</a></li>
							</ul>
						</li>
						<li><a href="<spring:url value="/logout"/>"><i class="icon-off icon-white"></i>&nbsp;<spring:message code="header.btn.logout" /></a></li>
					</ul>
				</div>
			</sec:authorize>
			<!-- /.nav-collapse -->
		</div>
	</div>
	<!-- /navbar-inner -->
</div>